home *** CD-ROM | disk | FTP | other *** search
/ In Focus Guide to Better Photography / In Focus Guide to Better Photography.iso / exposure.dxr / 00001_• movie script.ls next >
Encoding:
Text File  |  1997-07-07  |  4.1 KB  |  168 lines

  1. global folderName, sndPath, gMachine, gCurPicture, gTabSprite, gCurMode, gCurShutter, gCurFStop, gBestExposureList, gHaveGoneToAperturePriority, gHaveGoneToShutterPriority
  2.  
  3. on startMovie
  4.   set gCurPicture to 1
  5.   set gCurShutter to 1
  6.   set gCurFStop to 1
  7.   set folderName to "exposure" & gMachine
  8.   set sndPath to the pathName & "snd" & gMachine & "exposure" & gMachine
  9.   set gBestExposureList to list(158, 151, 144, 137, 130, 123, 116)
  10.   initForEachMovie(#exposure)
  11.   preLoadRange(62, 104, 1)
  12.   set gHaveGoneToAperturePriority to 0
  13.   set gHaveGoneToShutterPriority to 0
  14. end
  15.  
  16. on stopMovie
  17. end
  18.  
  19. on doThumbNailLeftRight leftOrRight
  20.   if leftOrRight = -1 then
  21.     if gCurPicture = 1 then
  22.       set gCurPicture to 2
  23.     else
  24.       set gCurPicture to gCurPicture - 1
  25.     end if
  26.   else
  27.     if gCurPicture = 2 then
  28.       set gCurPicture to 1
  29.     else
  30.       set gCurPicture to gCurPicture + 1
  31.     end if
  32.   end if
  33.   doThumbNailAnimation(29, 19 + (gCurPicture - 1), 2, leftOrRight)
  34.   setupThumbNailCounter(gCurPicture, 2)
  35.   NewPicture(0)
  36. end
  37.  
  38. on NewPicture dosound
  39.   if dosound then
  40.     puppetSound("CameraShutter")
  41.     mydelay(9)
  42.   end if
  43.   if gCurMode = 1 then
  44.     set newPict to 110 + ((gCurPicture - 1) * 60) + ((gCurShutter - 1) * 8) + (6 - (gCurFStop - 1))
  45.   else
  46.     if gCurMode = 2 then
  47.       set newPict to getAt(gBestExposureList, 8 - gCurShutter) + ((gCurPicture - 1) * 60)
  48.     else
  49.       set newPict to getAt(gBestExposureList, 8 - gCurFStop) + ((gCurPicture - 1) * 60)
  50.     end if
  51.   end if
  52.   set the castNum of sprite 7 to newPict
  53.   updateStage()
  54.   repeat while soundBusy(1)
  55.   end repeat
  56.   puppetSound(0)
  57. end
  58.  
  59. on finishIntro
  60.   set the mouseDownScript to EMPTY
  61.   set the mouseUpScript to EMPTY
  62.   finishIntroBecauseOfMouseClick()
  63. end
  64.  
  65. on finishIntroBecauseOfMouseClick
  66.   global gSavePhotoCastNum, start, oldStart, gDoOnMouseDown
  67.   puppetTempo(30)
  68.   puppetSprite(7, 1)
  69.   set the castNum of sprite 7 to gSavePhotoCastNum
  70.   updateTabs()
  71.   updateStage()
  72.   set gDoOnMouseDown to EMPTY
  73.   finishIntroCore()
  74. end
  75.  
  76. on doModeChange
  77.   set the mouseUpScript to EMPTY
  78.   dontPassEvent()
  79.   if gCurMode = 1 then
  80.     set gCurMode to 2
  81.   else
  82.     if gCurMode = 2 then
  83.       set gCurMode to 3
  84.     else
  85.       if gCurMode = 3 then
  86.         set gCurMode to 1
  87.       end if
  88.     end if
  89.   end if
  90.   if gCurMode = 1 then
  91.     onOffScreen(15, 0)
  92.     onOffScreen(16, 0)
  93.   else
  94.     if gCurMode = 2 then
  95.       onOffScreen(15, 1)
  96.       onOffScreen(16, 0)
  97.     else
  98.       onOffScreen(15, 0)
  99.       onOffScreen(16, 1)
  100.     end if
  101.   end if
  102.   set the castNum of sprite 11 to 62 + ((gCurMode - 1) * 2)
  103.   updateStage()
  104.   if gCurMode = 2 then
  105.     set the castNum of sprite 40 to the castNum of sprite 40 - 1
  106.     doShutterChange(0)
  107.     if gHaveGoneToShutterPriority = 0 then
  108.       set gHaveGoneToShutterPriority to 1
  109.       sound playFile 2, sndPath & "shutter.aif"
  110.       updateStage()
  111.     end if
  112.   else
  113.     if gCurMode = 3 then
  114.       set the castNum of sprite 10 to the castNum of sprite 10 - 1
  115.       doFStopChange(0)
  116.       if gHaveGoneToAperturePriority = 0 then
  117.         set gHaveGoneToAperturePriority to 1
  118.         sound playFile 2, sndPath & "aperture.aif"
  119.         updateStage()
  120.       end if
  121.     else
  122.       doShutterChange(0)
  123.       doFStopChange(0)
  124.     end if
  125.   end if
  126. end
  127.  
  128. on onOffScreen asprite, putOnScreen
  129.   set curLocH to the locH of sprite asprite
  130.   if putOnScreen then
  131.     if curLocH > 2000 then
  132.       set the locH of sprite asprite to curLocH - 2000
  133.     end if
  134.   else
  135.     if curLocH < 2000 then
  136.       set the locH of sprite asprite to curLocH + 2000
  137.     end if
  138.   end if
  139. end
  140.  
  141. on doFStopChange dosound
  142.   if voidp(dosound) then
  143.     set dosound to 1
  144.   end if
  145.   set the mouseUpScript to EMPTY
  146.   dontPassEvent()
  147.   set the castNum of sprite 10 to 75 + ((gCurFStop - 1) * 2) + 1
  148.   if gCurMode = 3 then
  149.     set gCurShutter to gCurFStop
  150.     set the castNum of sprite 40 to 26 + (gCurShutter - 1)
  151.   end if
  152.   NewPicture(dosound)
  153. end
  154.  
  155. on doShutterChange dosound
  156.   if voidp(dosound) then
  157.     set dosound to 1
  158.   end if
  159.   set the mouseUpScript to EMPTY
  160.   dontPassEvent()
  161.   set the castNum of sprite 40 to 91 + ((gCurShutter - 1) * 2) + 1
  162.   if gCurMode = 2 then
  163.     set gCurFStop to gCurShutter
  164.     set the castNum of sprite 10 to 48 + (gCurFStop - 1)
  165.   end if
  166.   NewPicture(dosound)
  167. end
  168.